<link rel="StyleSheet" href="/css/dtree.css" type="text/css" />
<script type="text/javascript" src="/js/dtree.js"></script>
<style type="text/css">
#main table {
	border-top:1px #666666 solid;
	border-right:1px #666666 solid;
}
#main table tr:hover td { background: #FFFB82; cursor:pointer; color:#000000;}/*隔行换色鼠标经过效果*/
#main td {
	border-left:1px #666666 solid;
	border-bottom:1px #666666 solid;
	height:29px;
	overflow:hidden;
}
</style>
<script>
function deltetItem(projectid,itemid)
{
	if(confirm("确定要删除吗？"))
	{
		location.href="/project/deleteProjectItem.do?projectid="+projectid+"&itemid="+itemid;
	}
}
</script>

<table width="90%" style="margin-top:20px;" border="0" align="center" cellpadding="10" cellspacing="0">
	<tr>
		<td>
		<div id="main">
		<form action="/project/completeCreateProject.do" method="post">
			<h3>评分项目预览</h3>提示：<font color="red"><b>如果删除或者添加评分子项，可以点击"重新计算项目分数"以重新计算项目分数</b></font>
			<fieldset>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr style="color:#FFFFFF">
						<td height="30" colspan="4" align="left" valign="middle" bgcolor="#333333">　<strong>项目基本信息</strong></td>
			    	</tr>
					<tr>
                      <td width="10%" height="30" align="center">项目名称:</td>
					  <td width="40%">&nbsp;$!project.name <input type="hidden" name="projectId" value="$project.id"></td>
					  <td width="10%" align="center">项目状态:</td>
					  <td width="40%">&nbsp;#if($!project.status==0)建立中#elseif($!project.status==1)评分中#else已结束#end</td>
				  </tr>
					<tr>
                      <td height="30" align="center">建设单位:</td>
					  <td>&nbsp;$!project.buildUnit</td>
					  <td align="center">施工单位:</td>
					  <td>&nbsp;$!project.constructUnit</td>
				  </tr>
					<tr>
                      <td height="30" align="center">设计单位:</td>
					  <td>&nbsp;$!project.designUnit</td>
					  <td align="center">监理单位:</td>
					  <td>&nbsp;$!project.supervisorUnit</td>
				  </tr>
					<tr>
					  <td height="50" align="center">评分人员:</td>
				      <td>&nbsp;
				      #foreach($user in $userList)
						$user.realName&nbsp;
						#end
				      </td>
				      <td align="center">开始时间:</td>
				      <td>&nbsp;$DateUtil.formatDate($!project.startTime,"yyyy-MM-dd HH:mm:ss") </td>
			    	</tr>
				</table>
				<h3 style="margin-top:10px;">查看详细评分项分数设置</h3>
				<div style="width:100%;">
					<ul>
						<li style="width:30%; float:left;">
						<div class="dtree">
							<p><a href="javascript: d.openAll();">全部展开</a> | <a href="javascript: d.closeAll();">全部收起</a></p>
						<script type="text/javascript">
						<!--
							d = new dTree('d');
							d.add(0, -1, '评分项目');
							#foreach($tree in $treeList)
								#if($tree.hasScoreItem==true)
									#if($allProjectItemMap.containsKey($tree.id))
									d.add($tree.id, $tree.pid, '$tree.cateName', '/project/ProjectView.jsp?projectId=$project.id&treeId=$tree.id','','_self');
									#end
								#else
								  d.add($tree.id, $tree.pid, '$tree.cateName', '/project/ProjectView.jsp?projectId=$project.id&treeId=$tree.id','','_self','/images/folder.gif', '/images/folderopen.gif');
								#end
							#end
							document.write(d);
						//-->
						</script>
						</div>
						</li>
						<li style="width:70%; float:left;">
						<div style="width:100%; background-color:#333333; color:#FFFFFF; line-height:30px; vertical-align:middle;">　<strong>评分项列表</strong></div>
						<table width="100%" border="0" cellpadding="5" cellspacing="0">
				  <tr style="color:#FFFFFF">
					<td width="15%" align="center" valign="middle" bgcolor="#333333"><strong>所属项目</strong></td>
				    <td width="60%" align="center" valign="middle" bgcolor="#333333"><strong>评价名称</strong></td>
				    <td width="10%" align="center" valign="middle" bgcolor="#333333"><strong>分值</strong></td>
				    <td width="15%" align="center" valign="middle" bgcolor="#333333"><strong>操作</strong></td>
				  </tr>
				   #foreach($ProjectItems in $projectItemsList)
              <tr align="center">
                <td height="20" align="center" bgcolor="#FFFFFF">$!scoreTree.cateName</td>
                <td  align="left" bgcolor="#FFFFFF">$!ProjectItems.scoreItem.itemName</td>
                <td  align="center" bgcolor="#FFFFFF">$!ProjectItems.score</td>
                <td   align="center" bgcolor="#FFFFFF">
                  #if($!project.status==0)<a href="javascript:deltetItem($!project.id,$!scoreTree.id);">删除子项</a>#end
               </td>
              </tr> 
              #end        	  
				</table>
						</li>
					</ul>
				</div>
				<div style="width:100%; float:left; height:30px; line-height:30px; vertical-align:middle; margin-top:10px; padding-top:10px; border-top:1px #333333 solid;">　项目总分：<span style="color:#FF0000;">$totalScore</span>分，当前已设置：<span style="color:#FF0000;">$currentScore</span>分；
				  <input type="submit" name="Submit3" value="确定无误，生成项目" #if($totalScore!=$currentScore) disabled #end  />
		      <input type="button" name="Submit32" value="重新计算项目分数" onclick="javascript:location.href='/project/reCalculateProjectScore.do?projectid=$!project.id';this.disabled=true;"/>
		      <input type="button" name="Submit32" value="返回修改" onclick="javascript:location.href='/project/addNewProject_StepTwoNew.jsp?id=$project.id';"/>
				
				</div>
			</fieldset>
		</form>
		</div>
		</td>
	</tr>
</table>